// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */

// 会员管理
import Coupon from '@/views/system/Coupon';
// 课程管理
import GymCourse from '@/views/system/GymCourse';
// 活动管理
import GymEvent from '@/views/system/GymEvent';
// 会员管理
import GymMember from '@/views/system/GymMember';
// 体育馆管理
import Gymnasium from '@/views/system/Gymnasium';
// 场地管理
import Site from '@/views/system/Site';
// 用户管理
import user from '@/views/system/User';

// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [
        //      {
        //     path: '/machine/Machine',
        //     name: '机器信息管理',
        //     component: Machine,
        //     meta: {
        //         requireAuth: true
        //     }
        // },
        //  {
        //     path: '/machine/MachineAisle',
        //     name: '货道信息管理',
        //     component: MachineAisle,
        //     meta: {
        //         requireAuth: true
        //     }
        // },
        
        {
            path: '/pay/Order',
            name: '交易订单',
            component: Order,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/user',
            name: '用户管理',
            component: user,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Coupon',
            name: '优惠券管理',
            component: Coupon,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/GymEvent',
            name: '活动管理',
            component: GymEvent,
            meta: {
                requireAuth: true
            }
        },{
          path: '/system/Gymnasium',
          name: '体育馆管理',
          component: Gymnasium,
          meta: {
            requireAuth: true
          }
        }, {
          path: '/system/GymMember',
          name: '会员管理',
          component: GymMember,
          meta: {
            requireAuth: true
          }
        },
        // {
        //     path: '/system/Dept',
        //     name: '公司管理',
        //     component: Dept,
        //     meta: {
        //         requireAuth: true
        //     }
        // }, 
        {
            path: '/system/Site',
            name: '场地管理',
            component: Site,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/GymCourse',
            name: '课程管理',
            component: GymCourse,
            meta: {
                requireAuth: true
            }
        }, 
        // {
        //     path: '/machine/MachineConfig',
        //     name: '支付配置信息',
        //     component: MachineConfig,
        //     meta: {
        //         requireAuth: true
        //     }
        // }, 
        {
            path: '/pay/Config',
            name: '支付配置',
            component: Config,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/druid/login',
            name: '监控查询',
            component: druidLogin,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/charts/statistics',
            name: '数据可视化',
            component: statistics,
            meta: {
                requireAuth: true

            }
        }]
    }]
})
